package com.quan.upms.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.quan.common.core.support.BaseMapper;
import com.quan.upms.entity.UpmsPermission;
import com.quan.upms.entity.UpmsRole;
import com.quan.upms.entity.UpmsUser;

/**
 * <p>
 * 通用用户权限系统-用户表 Mapper 接口
 * </p>
 *
 * @author 杨浩泉
 * @since 2018-05-13
 */
public interface UpmsUserMapper extends BaseMapper<UpmsUser> {
	
	/**
	 * 查找用户角色
	 * @param userId
	 * @return
	 */
	public List<UpmsRole> findRolesByUserId(@Param("userId")Long userId);
	
	/**
	 * 查找用户权限
	 * @param roleIds 角色ID【1,2,3,4,5】
	 * @return
	 */
	public List<UpmsPermission> findPermissionsByUserId(@Param("userId")Long userId);

}
